<template>
  <div class="add-btn">
    <el-dialog
      class="elDialog"
      title="操作日志详细"
      :visible.sync="dialogVisible"
      width="800px"
      :close-on-click-modal="false"
      @close="closeAddDialog"
    >
      <el-form
        :model="editRowInfo"
        ref="refRoleAdd"
        label-width="110px"
      >
        <el-row>
          <el-col :span="12">
            <el-form-item size="small" label="用户名：">
              <span>{{ editRowInfo.userName }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item size="small" label="请求URL：">
              <span>{{ editRowInfo.operUri }}</span>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item size="small" label="操作地点：">
              <span>{{ editRowInfo.operLocation }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
                <el-form-item size="small" label="请求方式：">
                  <span>  {{ editRowInfo.operRequMethod }}</span>
            </el-form-item>
          </el-col>
        </el-row>

       

         <el-form-item size="small" label="请求方法：">
          <span> {{ editRowInfo.operMethod }}</span>
             
            </el-form-item>
         <el-form-item size="small" label="请求参数：">
          <span> {{ editRowInfo.operRequParam }}</span>
          </el-form-item>

          <el-form-item size="small" label="返回参数：">
            <span> {{ editRowInfo.operRespParam }}</span>
          </el-form-item>

            <el-row>
          <el-col :span="12">
              <el-form-item size="small" label="操作状态：">
              <span v-if="editRowInfo.status==0">正常</span>
              <span v-else>失败</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item size="small" label="操作时间：">
              <span> {{ editRowInfo.createTime }}</span>
            </el-form-item>
          </el-col>
        </el-row>

        <el-form-item size="small" label="异常信息：" v-if="editRowInfo.status==1">
          <span>{{ editRowInfo.errorMsg }}</span>
          </el-form-item>

      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button size="small" @click="closeAddDialog">关 闭</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>

export default {
  name: "addRole",
  components: {  },
  props: ["editRowInfo"],
  data() {
    return {
      dialogVisible: false,
    };
  },
  computed: {
  
  },
  watch: {},
  methods: {
    // 点击取消和关闭按钮
    closeAddDialog() {
      // this.$refs.refRoleAdd.resetFields();
      this.dialogVisible = false;
    },
  },
  created() {},
};
</script>

<style lang="less" scoped>
span{
  color: @primaryFFFColor2;
}
::v-deep .el-button--small {
  background: #fff !important;
  color: #606266 !important;
  border: 1px solid #DCDFE6 !important;
  &:hover {
    box-shadow: none !important;
  }
}
</style>
